package com.data.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Liuyangj
 * @Description
 * @date 2025/10/13 14:04
 */
@Controller
public class IndexController {
    // 主页面：列表 + 搜索 + 分页
    @GetMapping("/")
    public String index(
            @RequestParam(required = false) String keyword,
            Model model) {

        model.addAttribute("keyword", keyword);
        return "list"; // 返回 templates/list.html
    }
}
